package com.stox.services.data.provider.repository;

import java.util.Date;
import java.util.List;

import com.stox.shared.model.Bar;
import com.stox.shared.model.enumeration.BarSpan;

public interface BarRepository {
	
	public Bar save(Bar bar);
	
	public void flush();
	
	public List<Bar> findByScripId(Long scripId);
	
	public List<Bar> findByScripId(Long scripId,final int count);
	
	public List<Bar> findByScripId(Long scripId, final Date start);
	
	public List<Bar> findByScripId(Long scripId, final Date start, final Date end);
	
	public List<Bar> findByScripId(Long scripId, BarSpan spanType, Date start, Date end);
	
	public List<Bar> findByScripId(Long scripId, BarSpan spanType, Date start,int count);
	
	public List<Bar> findByScripId(Long scripId, BarSpan barSpan, Integer offset, Integer count);
	
}
